<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/activeqt/container/qaxscript.cpp -->
<head>
  <title>Qt 4.3: QAxScriptEngine Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QAxScriptEngine Class Reference<br /><sup><sup>[<a href="qaxcontainer.html">QAxContainer</a> module]</sup></sup></h1>
<p>The QAxScriptEngine class provides a wrapper around a script engine. <a href="#details">More...</a></p>
<pre> #include &lt;QAxScriptEngine&gt;</pre><p>Inherits <a href="qaxobject.html">QAxObject</a>.</p>
<ul>
<li><a href="qaxscriptengine-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h3>Public Types</h3>
<ul>
<li><div class="fn"/>enum <b><a href="qaxscriptengine.html#State-enum">State</a></b> { Uninitialized, Initialized, Started, Connected, Disconnected, Closed }</li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qaxscriptengine.html#QAxScriptEngine">QAxScriptEngine</a></b> ( const QString &amp; <i>language</i>, QAxScript * <i>script</i> )</li>
<li><div class="fn"/><b><a href="qaxscriptengine.html#dtor.QAxScriptEngine">~QAxScriptEngine</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qaxscriptengine.html#addItem">addItem</a></b> ( const QString &amp; <i>name</i> )</li>
<li><div class="fn"/>bool <b><a href="qaxscriptengine.html#hasIntrospection">hasIntrospection</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qaxscriptengine.html#isValid">isValid</a></b> () const</li>
<li><div class="fn"/>long <b><a href="qaxscriptengine.html#queryInterface">queryInterface</a></b> ( const QUuid &amp; <i>uuid</i>, void ** <i>iface</i> ) const</li>
<li><div class="fn"/>QString <b><a href="qaxscriptengine.html#scriptLanguage">scriptLanguage</a></b> () const</li>
<li><div class="fn"/>void <b><a href="qaxscriptengine.html#setState">setState</a></b> ( State <i>st</i> )</li>
<li><div class="fn"/>State <b><a href="qaxscriptengine.html#state">state</a></b> () const</li>
</ul>
<ul>
<li><div class="fn"/>1 public function inherited from <a href="qaxobject.html#public-functions">QAxObject</a></li>
<li><div class="fn"/>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div class="fn"/>19 public functions inherited from <a href="qaxbase.html#public-functions">QAxBase</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li><div class="fn"/>1 property inherited from <a href="qaxbase.html#properties">QAxBase</a></li>
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li><div class="fn"/>3 signals inherited from <a href="qaxbase.html#signals">QAxBase</a></li>
<li><div class="fn"/>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div class="fn"/>5 protected functions inherited from <a href="qaxbase.html#protected-functions">QAxBase</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QAxScriptEngine class provides a wrapper around a script engine.</p>
<p>Every instance of the QAxScriptEngine class represents an interpreter for script code in a particular scripting language. The class is usually not used directly. The <a href="qaxscript.html">QAxScript</a> and <a href="qaxscriptmanager.html">QAxScriptManager</a> classes provide convenient functions to handle and call script code.</p>
<p>Direct access to the script engine is provided through <a href="qaxscriptengine.html#queryInterface">queryInterface</a>().</p>
<p><b>Warning:</b> This class is not available with the bcc5.5 and MingW compilers.</p>
<p>See also <a href="qaxscript.html">QAxScript</a>, <a href="qaxscriptmanager.html">QAxScriptManager</a>, <a href="qaxbase.html">QAxBase</a>, and <a href="activeqt.html">ActiveQt Framework</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="State-enum"></a>enum QAxScriptEngine::State</h3>
<p>The State enumeration defines the different states a script engine can be in.</p>
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QAxScriptEngine::Uninitialized</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The script has been created, but not yet initialized</td></tr>
<tr><td valign="top"><tt>QAxScriptEngine::Initialized</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">The script has been initialized, but is not running</td></tr>
<tr><td valign="top"><tt>QAxScriptEngine::Started</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The script can execute code, but does not yet handle events</td></tr>
<tr><td valign="top"><tt>QAxScriptEngine::Connected</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The script can execute code and is connected so that it can handle events</td></tr>
<tr><td valign="top"><tt>QAxScriptEngine::Disconnected</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">The script is loaded, but is not connected to event sources</td></tr>
<tr><td valign="top"><tt>QAxScriptEngine::Closed</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">The script has been closed.</td></tr>
</table></p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QAxScriptEngine"></a>QAxScriptEngine::QAxScriptEngine ( const <a href="qstring.html">QString</a> &amp; <i>language</i>, <a href="qaxscript.html">QAxScript</a> * <i>script</i> )</h3>
<p>Constructs a <a href="qaxscriptengine.html">QAxScriptEngine</a> object interpreting script code in <i>language</i> provided by the code in <i>script</i>. This is usually done by the <a href="qaxscript.html">QAxScript</a> class when <a href="qaxscript.html#load">loading a script</a>.</p>
<p>Instances of <a href="qaxscriptengine.html">QAxScriptEngine</a> should always have both a language and a script.</p>
<h3 class="fn"><a name="dtor.QAxScriptEngine"></a>QAxScriptEngine::~QAxScriptEngine ()</h3>
<p>Destroys the <a href="qaxscriptengine.html">QAxScriptEngine</a> object, releasing all allocated resources.</p>
<h3 class="fn"><a name="addItem"></a>void QAxScriptEngine::addItem ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )</h3>
<p>Registers an item with the script engine. Script code can refer to this item using <i>name</i>.</p>
<h3 class="fn"><a name="hasIntrospection"></a>bool QAxScriptEngine::hasIntrospection () const</h3>
<p>Returns true if the script engine supports introspection; otherwise returns false.</p>
<h3 class="fn"><a name="isValid"></a>bool QAxScriptEngine::isValid () const</h3>
<p>Returns true if the script engine has been initialized correctly; otherwise returns false.</p>
<h3 class="fn"><a name="queryInterface"></a>long QAxScriptEngine::queryInterface ( const <a href="quuid.html">QUuid</a> &amp; <i>uuid</i>, void ** <i>iface</i> ) const</h3>
<p>Requests the interface <i>uuid</i> from the script engine object and sets the value of <i>iface</i> to the provided interface, or to 0 if the requested interface could not be provided.</p>
<p>Returns the result of the QueryInterface implementation of the COM object.</p>
<h3 class="fn"><a name="scriptLanguage"></a><a href="qstring.html">QString</a> QAxScriptEngine::scriptLanguage () const</h3>
<p>Returns the scripting language, for example &quot;VBScript&quot;, or &quot;JScript&quot;.</p>
<h3 class="fn"><a name="setState"></a>void QAxScriptEngine::setState ( <a href="qaxscriptengine.html#State-enum">State</a> <i>st</i> )</h3>
<p>Sets the state of the script engine to <i>st</i>. Calling this function is usually not necessary.</p>
<p>See also <a href="qaxscriptengine.html#state">state</a>().</p>
<h3 class="fn"><a name="state"></a><a href="qaxscriptengine.html#State-enum">State</a> QAxScriptEngine::state () const</h3>
<p>Returns the state of the script engine.</p>
<p>See also <a href="qaxscriptengine.html#setState">setState</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
